Chapter 1 Introduction
Chapter 1 Introduction
What Is an Operating System?
program act as the intermediary between
- user program/applications
- computer hardware
Goals
- exe. user program
- let app. do not have to deal with hardware directly
- ensure efficient resource sharing
Computer System Structure
4 part(from bottom to up)
- Hardware- CPU, memory, I/O
 
- operation system- Controls and coordinates use of hardware among various applications and users
 
- system, application program- Word processors, compilers, web browsers, database systems, video games
 
- users- People, machines, other computers
 
image
Operating System Definition
The one program running at all time on the computer
- kernal
Everything else
- system program
- application program
2 points of view of OS
- resource allocator- Manages all resources
- Applications do not have to manage resources directly – OS hides HW interface
- Decides between conflicting requests for efficient and fair resource use
 
- control program- Controls execution of programs to prevent errors and improper use of the computer
 
- other- monitor the other programs
- allows the other programs to share resources in a controlled manner- CPU, memory, IO devices…
 
 
Computer Startup
Bootstrap program is loaded at power-up or reboot (load OS)
- Typically stored in ROM or EEPROM, generally known as firmware
- Jobs- Initializes all aspects of system
- Loads operating system kernel and starts OS execution
 
- called a boot loader
Who loads the boot loader?
- In PC, BIOS loads the (in-disk) boot loader
- In many other platforms, boot loader is placed at a predefined memory address (in ROM or EEPROM)- Hardware jumps to the boot loader directly
 
Computer-System Organization
Computer-system operation
- One or more CPUs, device controllers connect through common bus providing access to shared memory
- Concurrent execution of CPUs and devices competing for
 bus cycles
 
Computer-System Operation
- I/O devices and the CPU can execute concurrently.
- Each device controller is in charge of a particular device type.
- Each device controller has a local buffer.
- Writing data to device- (Device driver running on the) CPU moves data from main memory to local buffers
- Device controller writes the data from the local buffer to the device
- Device controller informs CPU that it has finished its operation by generating an interrupt
 
- One of the jobs of an operating system is to manage interrupts.
Common Functions of Interrupts
interrupt
software trigger
Interrupt Handling

Saving/Restoring CPU State – An Example
Interrupt-drive I/O Cycle
 
- timeline
Two I/O Methods

Direct Memory Access (DMA)

Storage Structure


Caching

Performance of Various Levels of Storage
Migration of Data A from Disk to Register
Computer-System Architecture

Symmetric Multiprocessing
Multicore Systems

Graceful Degradation
Non-Uniform Memory Access (NUMA)

Problem
Clustered Systems

General Structure of a Clustered System
Type
Multiprogramming & Timesharing

Memory Layout for a Multiprogrammed System
Timesharing
Operating-System Operations

Transition from User to Kernel Mode
Timers
Process Management

Process Management Activities
Memory Management

Storage Management

File system management
Mass storage management
I/O Subsystem

Protection and Security

Users
set uid in linux
Virtualization

example
emulation
VMM
Basic Kernel Data Structures

list
stack and queue
tree
hashing and bitmap









































